﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Collections;

namespace Agresso.Interface.Layer.Domain
{
    public class i_jPOHeader
    {
        public int jPOheaderID = 0;
        public int PickedUpFlag = 0;
        public DateTime PickedUpAt = DateTime.Now;
        public string remarks = string.Empty;
        public DateTime PoDate;            //[PoDate] [datetime] NULL,
        public string PoNo;//[PoNo] [varchar](20) NOT NULL,


        public i_jPOHeader(SqlDataReader rd)
        {
            jPOheaderID = rd["jPOheaderID"] is DBNull ? jPOheaderID : Convert.ToInt32(rd["jPOheaderID"]);
            PickedUpFlag = rd["PickedUpFlag"] is DBNull ? PickedUpFlag : Convert.ToInt32(rd["PickedUpFlag"]);
            PickedUpAt = rd["PickedUpAt"] is DBNull ? PickedUpAt : Convert.ToDateTime(rd["PickedUpAt"]);
            PoNo = rd["PoNo"] is DBNull ? PoNo : rd["PoNo"].ToString();
            PoDate = rd["PoDate"] is DBNull ? PoDate : Convert.ToDateTime(rd["PoDate"]);
            remarks = rd["remarks"] is DBNull ? remarks : rd["remarks"].ToString();
        }
    }
}
